home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / flex_247.zip / flex_247 / MISC / VMS / VMS.Makefile < prev    next >
Makefile  |  1990-12-11  |  9KB  |  277 lines

  1. add -8 to FLEX_FLAGS
  2.  
  3.  
  4. (Message inbox:29)
  5. Date:  Thu, 16 Aug 90 13:40:48 CDT
  6. From:  Terry Poot <tp@mccall.com>
  7. Subject:  Re: flex 2.3 patch #4 
  8. To:  vern@cs.cornell.edu
  9.  
  10. >You shouldn't need either alloca() or bcopy() - try deleting them from
  11. >the Makefile and see if it still builds.  If it does, let me know and
  12. >I'll fix the Makefile for the 2.4 release.  (I don't keep the Makefile
  13. >up-to-date it since I don't have a VMS system easily available for testing.)
  14.  
  15. Well, I built it. The makefile provided depended on a non-standard configuratio
  16. of the system libraries (the C library is NOT searched by default on VMS, but 
  17. that file assumed it was, which CAN be arranged easily, but it doesn't come tha
  18. way). I've fixed this problem. I've also modified it to be able to use YACC 
  19. rather than BISON, though BISON is the default. In addition to this file, I'm 
  20. enclosing a link options file (needed to fix the above problem), and a VMS 
  21. command procedure useable by sites without MMS (which is an extra cost product 
  22. from DEC) to build FLEX. I don't have shar, and I figured a VMS_SHARE file 
  23. wouldn't do you any good, so you'll have to unpack these by hand.
  24.  
  25. When I built it, the test failed. It looks like initscan has not been rebuilt 
  26. with the new version. The only difference that concerns me is that yy_ec has 
  27. gone from [128] to [256], and been padded with "1" values. I don't know if that
  28.  
  29. is correct or not. Perhaps initscan should be rebuilt with the new flex so the 
  30. test will succeed. On the other hand, perhaps the problem is caused by my use o
  31. YACC rather than BISON, or that my patches are all screwed up. Any ideas?
  32.  
  33. I didn't have the original files you sent me, so I just used the new misc.c wit
  34. the rest of the files. If the only patch I screwed up was #4, this should be OK
  35. but on the other hand there may be other problems that caused the above 
  36. behavior. In either case, the files below should be fine, since you haven't 
  37. changed the build procedure appreciably. If my copy is messed up, I'll just get
  38.  
  39. it from comp.sources.unix when it comes out (is there any way you can get these
  40.  
  41. files into that distribution before it is posted?).
  42.  
  43. ------------ Begin new file flex/misc/opt.opt --------------
  44. sys$share:vaxcrtl.exe/share
  45. ------------ Begin new file flex/misc/vmsbuild.com ---------
  46. $ ! vmsbuild.com
  47. $ ! VMS build procedure for FLEX
  48. $ goto start
  49. $ help:
  50. $ type sys$input
  51.  
  52.  To use:
  53.  
  54.  Define tools$$exe, tools$$library, and tools$$manual to reflect the 
  55.  locations where you would like to store the executables, library (flex.skel)
  56.  and the manual pages.  These names can be defined at the command line
  57.  prompt:  eg.
  58.  
  59.     $ define tools$$exe disk:[dir1.dir2.etc]
  60.    
  61.  Your default directory should be the directory containing the flex
  62.  source. This file (vmsbuild.com) and the file opt.opt should be in the
  63.  [.misc] subdirectory under the default directory. You may now execute the
  64.  following command at the DCL command line:
  65.  
  66.    $ @[.misc]vmsbuild
  67.  
  68.  If you want to use YACC rather than BISON, enter the following command
  69.  at the DCL prompt instead:
  70.  
  71.    $ @[.misc]vmsbuild yacc
  72.  
  73. $ stop
  74. $ start:
  75. $ if f$trnlnm("tools$$exe").eqs."".or. -
  76.      f$trnlnm("tools$$library").eqs."".or. -
  77.      f$trnlnm("tools$$exe").eqs."".or. -
  78.      f$search("[.misc]opt.opt").eqs."" then goto help
  79. $ old_ve = f$verify(1)
  80. $ copy flex.skel tools$$library:flex.skel
  81. $ ! Installed tools$$library:flex.skel
  82. $ copy flex.1 tools$$manual:flex.doc
  83. $ ! installed tools$$manual:flex.doc
  84. $ cc /define=(VMS,USG) ccl.c
  85. $ cc /define=(VMS,USG) dfa.c
  86. $ cc /define=(VMS,USG) ecs.c
  87. $ cc /define=(VMS,USG) gen.c
  88. $ cc /define=(VMS,USG,"DEFAULT_SKELETON_FILE=""tools$$library:FLEX.SKEL""") 
  89. main.c
  90. $ cc /define=(VMS,USG) misc.c
  91. $ cc /define=(VMS,USG) nfa.c
  92. $ if p2.eqs."YACC"
  93. $ then
  94. $    yacc -d -v parse.y
  95. $    copy y-tab.c parse.c
  96. $    del/noconfirm y-tab.c;*
  97. $    copy y-tab.h parse.h
  98. $    del/noconfirm y-tab.h;*
  99. $ else
  100. $    bison/defines/verbose/fixed_outfiles parse.y
  101. $    copy y_tab.c parse.c
  102. $    del/noconfirm y_tab.c;*
  103. $    copy y_tab.h parse.h
  104. $    del/noconfirm y_tab.h;*
  105. $ endif
  106. $ cc /define=(VMS,USG) parse.c
  107. $ copy initscan.c scan.c
  108. $ cc /define=(VMS,USG) scan.c
  109. $ cc /define=(VMS,USG) sym.c
  110. $ cc /define=(VMS,USG) tblcmp.c
  111. $ cc /define=(VMS,USG) yylex.c
  112. $ link /exe=flex.exe -
  113.    ccl.obj,dfa.obj,ecs.obj,gen.obj,main.obj,misc.obj,nfa.obj,parse.obj, -
  114.    scan.obj,sym.obj,tblcmp.obj,yylex.obj,[.misc]opt.opt/opt
  115. $ copy flex.exe tools$$exe:flex.exe
  116. $ flex :== $ tools$$exe:flex.exe
  117. $ ! Installed FLEX and LIBRARIES
  118. $ x = f$verify(old_ve)
  119. ------------ Begin changed file flex/misc/makefile.vms ---------
  120. ############################ VMS MAKEFILE ##############################
  121. #
  122. # Define tools$$exe, tools$$library, and tools$$manual to reflect the 
  123. # locations where you would like to store the executables, library (flex.skel)
  124. # and the manual pages.  These names can be defined at the command line
  125. # prompt:  eg.
  126. #    $ define tools$$exe disk:[dir1.dir2.etc]
  127. #   
  128. # If you want to use YACC rather than BISON, enter the following command
  129. # at the DCL prompt before running MMS.
  130. #
  131. #    $ use_yacc==1
  132. #
  133. # Your default directory should be the directory containing the flex
  134. # source. This file (makefile.vms) and the file opt.opt should be in the
  135. # [.misc] subdirectory under the default directory. You may now execute the
  136. # following commands at the DCL command line:
  137. #
  138. #   $ mms/descrip=[.misc]makefile.vms install
  139. #   $ mms/descrip=[.misc]makefile.vms test
  140. #   $ mms/descrip=[.misc]makefile.vms clean
  141. #
  142. # When "mms/descrip=[.misc]makefile.vms test" is executed the diff should
  143. # not show any differences. In fact the same effect can be achieved by
  144. #
  145. #   $ mms/descrip=[.misc]makefile.vms install, test, clean
  146. #
  147. # VMS make file for "flex" tool
  148.  
  149. # Redefine the following for your own environment
  150. BIN = tools$$exe
  151. LIB = tools$$library
  152. MAN = tools$$manual
  153.  
  154. SKELETON_FILE = "DEFAULT_SKELETON_FILE=""$(LIB):FLEX.SKEL"""
  155.  
  156. CCFLAGS = VMS,USG
  157. FLEX_FLAGS = -is
  158.  
  159. FLEXOBJS = ccl.obj dfa.obj ecs.obj gen.obj main.obj misc.obj nfa.obj  -
  160.            parse.obj scan.obj sym.obj tblcmp.obj yylex.obj 
  161.  
  162. OBJ = ccl.obj,dfa.obj,ecs.obj,gen.obj,main.obj,misc.obj,nfa.obj,parse.obj, -
  163.       scan.obj,sym.obj,tblcmp.obj,yylex.obj
  164.  
  165. default : flex
  166.     ! installed FLEX
  167.  
  168. install : lib man bin 
  169.     !Installed FLEX and LIBRARIES
  170.  
  171. lib : $(LIB):flex.skel
  172.     ! Installed $(LIB):flex.skel
  173.  
  174. bin : $(BIN):flex.exe
  175.     flex :== $ $(BIN):flex.exe
  176.  
  177. man : $(MAN):flex.doc
  178.     ! installed $(MAN):flex.doc
  179.  
  180. $(LIB):flex.skel : flex.skel
  181.     copy flex.skel $(LIB):flex.skel
  182. $(BIN):flex.exe : flex.exe
  183.     copy flex.exe $(BIN):flex.exe
  184. $(MAN):flex.doc : flex.1
  185.     copy flex.1 $(MAN):flex.doc
  186.  
  187. flex : flex.exe
  188.     copy flex.exe $(BIN):flex.exe
  189.  
  190. flex.exe : $(FLEXOBJS)
  191.     link /exe=flex.exe -
  192.         $(OBJ),[.misc]opt.opt/opt
  193.  
  194.  
  195. .ifdef use_yacc
  196. parse.c : parse.y
  197.     yacc -d -v parse.y
  198.     copy y-tab.c parse.c
  199.     del/noconfirm y-tab.c;*
  200.  
  201. parse.h : parse.c
  202.     copy y-tab.h parse.h
  203.     del/noconfirm y-tab.h;*
  204.  
  205. .else
  206.  
  207. parse.c : parse.y
  208.     bison/defines/verbose/fixed_outfiles parse.y
  209.     copy y_tab.c parse.c
  210.     del/noconfirm y_tab.c;*
  211.  
  212. parse.h : parse.c
  213.     copy y_tab.h parse.h
  214.     del/noconfirm y_tab.h;*
  215.  
  216. .endif
  217.  
  218. scan.c : initscan.c
  219.     copy initscan.c scan.c
  220.  
  221. ccl.obj : ccl.c flexdef.h
  222.     cc /define=($(CCFLAGS)) ccl.c
  223. dfa.obj : dfa.c flexdef.h
  224.     cc /define=($(CCFLAGS)) dfa.c
  225. ecs.obj : ecs.c flexdef.h
  226.     cc /define=($(CCFLAGS)) ecs.c
  227. gen.obj : gen.c flexdef.h
  228.     cc /define=($(CCFLAGS)) gen.c
  229. main.obj : main.c flexdef.h
  230.     cc /define=($(CCFLAGS),$(SKELETON_FILE)) main.c
  231. misc.obj : misc.c flexdef.h
  232.     cc /define=($(CCFLAGS)) misc.c
  233. nfa.obj : nfa.c flexdef.h
  234.     cc /define=($(CCFLAGS)) nfa.c
  235. parse.obj : parse.c flexdef.h parse.h
  236.     cc /define=($(CCFLAGS)) parse.c
  237. scan.obj : scan.c parse.h flexdef.h
  238.     cc /define=($(CCFLAGS)) scan.c
  239. sym.obj : sym.c flexdef.h
  240.     cc /define=($(CCFLAGS)) sym.c
  241. tblcmp.obj : tblcmp.c flexdef.h
  242.     cc /define=($(CCFLAGS)) tblcmp.c
  243. yylex.obj : yylex.c parse.h flexdef.h
  244.     cc /define=($(CCFLAGS)) yylex.c
  245.  
  246. clean :
  247.     ! Cleaning up by deleting unnecessary object files etc.
  248.     - delete/noconfirm scan.c;*
  249.     - delete/noconfirm parse.c;*
  250.     - delete/noconfirm parse.h;*
  251.     - delete/noconfirm lexyy.c;*
  252.     - delete/noconfirm *.obj;*
  253.     - delete/noconfirm flex*.tmp;*
  254.     - delete/noconfirm y.output;*
  255.     - delete/noconfirm *.diff;*
  256.     - delete/noconfirm y_tab.*;*
  257.     - purge/log
  258.  
  259. test :  $(BIN):flex.exe
  260.     flex :== $ $(BIN):flex.exe
  261.     define tools$$library 'f$environment("default")'
  262.     sho log tools$$library
  263.     flex $(FLEX_FLAGS) scan.l
  264.     diff/out=flex.diff initscan.c lexyy.c
  265.     type/page flex.diff
  266.  
  267. ----------- End of file ----------------
  268. Terry Poot <tp@mccall.com>                The McCall Pattern Company
  269. (uucp: ...!rutgers!ksuvax1!mccall!tp)     615 McCall Road
  270. (800)255-2762, in KS (913)776-4041        Manhattan, KS 66502, USA
  271.  
  272.